Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/models_import #211

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

MikeMACintosh
Copy link

@MikeMACintosh MikeMACintosh commented Oct 21, 2023


name: "Pull request"
about: Make changes in scikit-uplift

📑 Description of the Change

If i try to import all models a get error:

>>> from sklift.models import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1053, in _handle_fromlist
  File "<frozen importlib._bootstrap>", line 1049, in _handle_fromlist
TypeError: Item in sklift.models.all must be str, not type

Verification Process

Change class type to str and it works:

>>> from sklift.models import *
>>> dir()
['ClassTransformation', 'ClassTransformationReg', 'SoloModel', 'TwoModels', 'annotations', 'builtins', 'doc', 'loader', 'name', 'package', 'spec']

maks-sh and others added 2 commits August 11, 2022 23:32
change from type to str in __all__ for models module to make possible: from sklift.models import *
@MikeMACintosh MikeMACintosh changed the title Patch 1 feature/models_import Oct 21, 2023
@MikeMACintosh
Copy link
Author

@maks-sh will this PR be merged?

@MikeMACintosh
Copy link
Author

Hi, @maks-sh
will this PR be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants